<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GCC Front Ends</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<body>
<h1>GCC Front Ends</h1>

<p>Currently the main GCC distribution contains front ends for C
(gcc), C++ (g++), Objective C,
Fortran, Ada (GNAT), Go, and D.</p>

<p>There are several more front ends for different languages that have
been written for GCC but not yet integrated into the main distribution
of the GNU Compiler Collection.  Some of these may be integrated in
future; others may not, for various reasons.</p>

<p>Example front ends for toy languages and guidance on writing
front ends are listed along with <a href="readings.html">other links
and readings</a>.  The source files <code>tree.h</code> and
<code>tree.def</code> are the key ones to be familiar with.</p>

<p>Some of these front ends are very much works in progress; others
are very mature.</p>

<ul>

<li><a href="https://www.gnu-pascal.de/gpc/h-index.html">GNU Pascal Compiler</a> (GPC).</li>

<li><a
href="https://mercurylang.org/download/gcc-backend.html">Mercury</a>,
a declarative logic/functional language. The University of Melbourne Mercury
compiler is written in Mercury; originally it compiled via C but now it also
has a back end that generates assembler directly, using the GCC back end.</li>

<li><a href="http://CobolForGCC.sourceforge.net/">Cobol For GCC</a>
(at an early stage of development).</li>

<li><a href="http://www.nongnu.org/gm2/">GNU Modula-2</a> implements
the PIM2, PIM3, PIM4 and ISO dialects of the language.  The compiler
is fully operational with GCC 10 and GCC 11 (on
GNU/Linux x86 systems).  Work is in progress to move the front end to
the GCC trunk.  The front end is mostly written in Modula-2 and it
includes a bootstrap tool which translates Modula-2 into C/C++.</li>

<li>Modula-3 (for links see <a
href="http://www.modula3.org/">www.modula3.org</a>); SRC M3 is based on an old
version of GCC and PM3 and CAM3 derive from SRC M3.  This compiler is
written in Modula-3; for copyright and licensing reasons neither the
small amount of C code that links to GCC and provides the interface to
the back end, nor the front end proper, is likely to be integrated in
GCC, nor is the front-end likely to change to a more normal interface
of linking directly to the back end.</li>

<li><a href="http://ghdl.free.fr">GHDL</a> is a GCC front end for the
VHDL (IEEE 1076) hardware design language.  GHDL and its runtime library
are written in Ada95 using GNAT and are distributed under the GPL.
Currently they only support GNU/Linux x86 systems.</li>

<li><a href="http://pl1gcc.sourceforge.net/">PL/1 for GCC</a> is a
GCC front end for the PL/I language.</li>

<li><a href="https://github.com/Intrepid/GUPC">GCC Unified Parallel C</a>
(GCC UPC) is a compilation and execution environment for Unified
Parallel C.</li>
</ul>

</body>
</html>
